project(pic_watermark)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC YES)

# 文件归类
file(GLOB SRC_FILES *.h *.cpp)
file(GLOB QT_UI_FILES *.ui)

source_group(ui FILES ${QT_UI_FILES})

find_package(Qt5 COMPONENTS Widgets Gui REQUIRED)

QT5_WRAP_UI(WRAP_FILES ${QT_UI_FILES})

set(CMAKE_INCLUDE_CURRENT_DIR ON)
include_directories(SYSTEM ${CMAKE_CURRENT_SOURCE_DIR})

add_executable(${PROJECT_NAME} WIN32 ${SRC_FILES} ${QT_UI_FILES})

target_link_libraries(${PROJECT_NAME} Qt5::Widgets Qt5::Gui)


# 安装
INSTALL(TARGETS ${PROJECT_NAME})
